import request from '@/utils/request'



// 查询领养记录
export function listRecord(query) {
    return request({
        url: '/archives/pAdoptRecord',
        method: 'get',
        params: query,
    })
}
// 删除领养记录
export function delRecord(recordId) {
    return request({
        url: '/archives/pAdoptRecord/' + recordId,
        method: 'delete'
    })
}


// 新增领养记录
// export function addRecord(data) {
//     return request({
//         url: '/archives/pAdoptRecord/createInfo',
//         method: 'post',
//         data: data
//     })
// }
// 新增领养记录
export function addRecord(adoptPhone, earTag) {
    const data = {
        adoptPhone,
        earTag
    }
    return request({
        url: '/archives/pAdoptRecord/createInfo',
        method: 'post',
        data: data
    })
}
// 修改领养记录
export function updateRecord(data) {
    return request({
        url: '/archives/pAdoptRecord',
        method: 'put',
        data: data
    })
}

// 查询岗位详细
export function getRecord(adoptId) {
    return request({
        url: '/archives/adoptInfo/' + adoptId,
        method: 'get'
    })
}